﻿<template>
    <view>
        <block v-for="(item,index) in coreshopdata" :key="index">
            <!--图片-->
            <coreshopImgSingle :coreshopData="item.parameters.list" v-if="item.widgetCode=='imgSingle' "></coreshopImgSingle>
            <!--服务商品-->
            <coreshopServiceGood :coreshopData="item" v-if="item.widgetCode=='service' "></coreshopServiceGood>
            <!--图片轮播-->
            <coreshopImgSlide :coreshopData="item.parameters" v-if="item.widgetCode=='imgSlide' "></coreshopImgSlide>
            <!--公告-->
            <coreshopNotice :coreshopData="item.parameters.list" v-if="item.widgetCode=='notice' "></coreshopNotice>
            <!--优惠券-->
            <coreshopCoupon :coreshopData="item" v-if="item.widgetCode=='coupon' "></coreshopCoupon>
            <!--拼团-->
            <coreshopPinTuan :coreshopData="item" v-if="item.widgetCode=='pinTuan' "></coreshopPinTuan>
            <!--搜索-->
            <coreshopSearch :coreshopData="item" v-if="item.widgetCode=='search' "></coreshopSearch>
            <!--宫格自定义导航-->
            <coreshopNavBar :coreshopData="item" v-if="item.widgetCode=='navBar' "></coreshopNavBar>
            <!--商品选项卡-->
            <coreshopGoodTabBar :coreshopData="item" v-if="item.widgetCode=='goodTabBar' "></coreshopGoodTabBar>
            <!--文章-->
            <coreshopArticle :coreshopData="item" v-if="item.widgetCode=='article' "></coreshopArticle>
            <!--文章分类-->
            <coreshopArticleClassify :coreshopData="item" v-if="item.widgetCode=='articleClassify' "></coreshopArticleClassify>
            <!--视频-->
            <coreshopVideo :coreshopData="item" v-if="item.widgetCode=='video' "></coreshopVideo>
            <!--商品-->
            <coreshopGoods :coreshopData="item" v-if="item.widgetCode=='goods' "></coreshopGoods>
            <!--浏览记录-->
            <coreshopRecord :coreshopData="item" v-if="item.widgetCode=='record' "></coreshopRecord>
            <!--空格-->
            <coreshopBlank :coreshopData="item" v-if="item.widgetCode=='blank' "></coreshopBlank>
            <!--多行文本输入区-->
            <coreshopTextArea :coreshopData="item" v-if="item.widgetCode=='textarea' "></coreshopTextArea>
            <!--图片集-->
            <coreshopImgWindow :coreshopData="item" v-if="item.widgetCode=='imgWindow' "></coreshopImgWindow>
            <!--文本内容-->
            <coreshopContent :coreshopData="item" v-if="item.widgetCode=='content' "></coreshopContent>
            <!--团购-->
            <coreshopGroupPurchase :coreshopData="item" v-if="item.widgetCode=='groupPurchase' "></coreshopGroupPurchase>
            <!--秒杀-->
            <coreshopSeckill :coreshopData="item" v-if="item.widgetCode=='seckill' "></coreshopSeckill>



            <!--弹窗广告-->
            <coreshopadpop :coreshopdata="item" v-if="item.widgetCode=='adpop' "></coreshopadpop>

        </block>
    </view>
</template>

<script>
    import coreshopImgSingle from '@/components/coreshop-page/coreshop-imgSingle.vue'
    import coreshopServiceGood from '@/components/coreshop-page/coreshop-serviceGood.vue'
    import coreshopImgSlide from '@/components/coreshop-page/coreshop-imgSlide.vue'
    import coreshopNotice from '@/components/coreshop-page/coreshop-notice.vue'
    import coreshopCoupon from '@/components/coreshop-page/coreshop-coupon.vue'
    import coreshopPinTuan from '@/components/coreshop-page/coreshop-pinTuan.vue'
    import coreshopSearch from '@/components/coreshop-page/coreshop-search.vue'
    import coreshopNavBar from '@/components/coreshop-page/coreshop-navBar.vue'
    import coreshopArticle from '@/components/coreshop-page/coreshop-article.vue'
    import coreshopArticleClassify from '@/components/coreshop-page/coreshop-articleClassify.vue'
    import coreshopGoodTabBar from '@/components/coreshop-page/coreshop-goodTabBar.vue'
    import coreshopVideo from '@/components/coreshop-page/coreshop-video.vue'
    import coreshopGoods from '@/components/coreshop-page/coreshop-goods.vue'
    import coreshopRecord from '@/components/coreshop-page/coreshop-record.vue'
    import coreshopBlank from '@/components/coreshop-page/coreshop-blank.vue'
    import coreshopTextArea from '@/components/coreshop-page/coreshop-textarea.vue'
    import coreshopImgWindow from '@/components/coreshop-page/coreshop-imgWindow.vue'
    import coreshopContent from '@/components/coreshop-page/coreshop-content.vue'
    import coreshopGroupPurchase from '@/components/coreshop-page/coreshop-groupPurchase.vue'
    import coreshopSeckill from '@/components/coreshop-page/coreshop-seckill.vue'

    import coreshopadpop from '@/components/coreshop-page/coreshop-adpop.vue'

    export default {
        name: 'coreshop-page',
        components: {
            coreshopImgSingle,
            coreshopServiceGood,
            coreshopImgSlide,
            coreshopNotice,
            coreshopCoupon,
            coreshopPinTuan,
            coreshopSearch,
            coreshopNavBar,
            coreshopArticle,
            coreshopArticleClassify,
            coreshopGoodTabBar,
            coreshopVideo,
            coreshopGoods,
            coreshopRecord,
            coreshopBlank,
            coreshopTextArea,
            coreshopImgWindow,
            coreshopContent,
            coreshopGroupPurchase,
            coreshopSeckill,

            coreshopadpop,
        },
        props: {
            coreshopdata: {
                default: function () {
                    return []
                }
            }
        }
    }
</script>
